#pragma once

struct GVertex
{
	float x;
	float y;
	float z;
};

struct GLRECT
{	
	GLRECT();
	GLRECT(int l, int t, int r, int b);
	bool PointInRect(int x, int y);
	GLRECT& Offset(int x, int y);
	GLRECT& Offset(int nValue);
	int width();
	int height();
	int left, top, right, botton;
};

struct GRGB
{
	GLubyte r;
	GLubyte g;
	GLubyte b;
	GRGB(){}
	GRGB(GLubyte red, GLubyte green, GLubyte blue)
	{
		r = red; g = green; b = blue;
	}
};

class GFont
{
public:
	enum HALIGN
	{
		LEFT, HMIDDLE, RIGHT
	};
	enum VALIGN
	{		
		TOP,VMIDDLE,BUTTON		
	};
public:
	static	GFont& Inst();
	void SelectFont(int size, int charset, const wchar_t* face);
	void DrawText(const wchar_t* szText,GRGB rgb, GLRECT rc, HALIGN h = HMIDDLE, VALIGN = VMIDDLE);
	void DrawLine(const wchar_t* szText,GRGB rgb, int x, int y);
};
